package com.domain.vote;

import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.cassandra.core.cql.Ordering;
import org.springframework.data.cassandra.core.cql.PrimaryKeyType;
import org.springframework.data.cassandra.core.mapping.PrimaryKeyColumn;
import org.springframework.data.cassandra.core.mapping.Table;

import java.time.LocalDateTime;
/**
 * 投票记录，关联关系
 */
@Table("uservote")
@ToString(callSuper = false)
@Data
@EqualsAndHashCode(callSuper=false)
@Builder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
public class UserVote {
    @Id
    public String id;
    @PrimaryKeyColumn(name = "userId",type = PrimaryKeyType.CLUSTERED,ordering = Ordering.ASCENDING,ordinal = 1)
    private String userId;
    private String articleId;
    private LocalDateTime createTime;

}
